package com.childenglish.entity;

import java.time.LocalDateTime;

public class SysUser {
    private Long id;              // user_id
    private String username;      // user_name
    private String password;
    private String role;          // role_key
    private String nickname;      // nick_name
    private String email;
    private String phone;         // phonenumber
    private String userType;      // user_type (00,01,02,03)
    private LocalDateTime createdTime; // create_time

    // 无参构造
    public SysUser() {}

    // 全参构造（可选）
    public SysUser(String username, String password, String role, String nickname,
                   String email, String phone, String userType, LocalDateTime createdTime) {
        this.username = username;
        this.password = password;
        this.role = role;
        this.nickname = nickname;
        this.email = email;
        this.phone = phone;
        this.userType = userType;
        this.createdTime = createdTime;
    }

    // Getter & Setter
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public String getUsername() { return username; }
    public void setUsername(String username) { this.username = username; }

    public String getPassword() { return password; }
    public void setPassword(String password) { this.password = password; }

    public String getRole() { return role; }
    public void setRole(String role) { this.role = role; }

    public String getNickname() { return nickname; }
    public void setNickname(String nickname) { this.nickname = nickname; }

    public String getEmail() { return email; }
    public void setEmail(String email) { this.email = email; }

    public String getPhone() { return phone; }
    public void setPhone(String phone) { this.phone = phone; }

    public String getUserType() { return userType; }
    public void setUserType(String userType) { this.userType = userType; }

    public LocalDateTime getCreatedTime() { return createdTime; }
    public void setCreatedTime(LocalDateTime createdTime) { this.createdTime = createdTime; }

    // toString（可选）
    @Override
    public String toString() {
        return "SysUser{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", role='" + role + '\'' +
                ", nickname='" + nickname + '\'' +
                ", userType='" + userType + '\'' +
                ", createdTime=" + createdTime +
                '}';
    }
}